<html>
<head>
    <title>Blog Home</title>
    <!-- 新增样式 -->
    <style>
        /* 基础布局重置 */
        body {
            font-family: 'Segoe UI', system-ui;
            margin: 10px auto;
            background: #f8f9fa;
            width: 100%;
            max-width: calc(100% - 20px);
        }

        /* 双栏容器 */
        .section-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            width: 100%;
            max-width: calc(100vw - 40px);
            margin: 0 auto;
        }

        /* 通用区块样式 */
        .section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 1.5rem;
            transition: transform 0.2s ease;
        }

        .section:hover {
            transform: translateY(-3px);
        }

        .section-primary {
            background-color: #fff; /* 更改背景颜色 */
            color: #333; /* 调整字体颜色 */
            border: 1px solid #ced4da; /* 添加边框 */
            padding: 10px; /* 增加内边距 */
            align-items: center;
            border-radius: 12px; /* 增加圆角 */
        }

        /* 快捷操作区块 */
        .section-primary h2 {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .section-primary ul {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1rem;
            padding: 0;
        }

        .section-primary li {
            list-style: none;
            background: #f8f9fa;
            border-radius: 8px;
            height: 120px;
            transition: background 0.2s ease;
        }

        .section-primary li:hover {
            background: #e9ecef;
        }

        .section-primary a {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: #2c3e50;
            text-decoration: none;
            width: 100%;
            height: 100%;
        }

        .section-primary a i {
            width: 28px;
            font-size: 36px;
            color: #3498db;
            margin-bottom: 20px;
        }

        /* 最近动作区块 */
        .section-secondary {
            background-color: #fff; /* 更改背景颜色 */
            color: #333; /* 调整字体颜色 */
            border: 1px solid #ced4da; /* 添加边框 */
            padding: 10px; /* 增加内边距 */
            align-items: center;
            border-radius: 12px; /* 增加圆角 */
        }

        .section-secondary h2 {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .section-secondary ul {
            padding: 0;
            margin: 0;
        }

        .section-secondary li {
            padding: 0.8rem;
            margin-bottom: 0.5rem;
            background: #f8f9fa;
            border-radius: 6px;
            font-size: 0.9rem;
            display: grid;
            grid-template-columns: 200px 1fr;
            gap: 0.5rem;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .section-container {
                grid-template-columns: 1fr;
            }

            .section-secondary {
                max-height: 300px;
            }
        }
    </style>
    <!-- 字体图标 -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
</head>
<body>
<!-- 优化后的区块结构 -->
<div class="section-container">
    <div class="section section-primary">
        <h2>📋 快捷操作</h2>
        <ul>
            <!-- 每个列表项增加tooltip提示 -->
            <li title="创建新文章">
                <a href="{% url 'admin:cms_article_add' %}">
                    <i class="fa fa-edit"></i>
                    <span>添加新文章</span>
                </a>
            </li>
            <li title="创建新分类">
                <a href="{% url 'admin:cms_category_add' %}">
                    <i class="fa fa-layer-group"></i>
                    <span>添加新分类</span>
                </a>
            </li>
            <li title="创建新标签">
                <a href="{% url 'admin:accounts_userprofile_add' %}">
                    <i class="fa fa-user-plus"></i>
                    <span>添加新用户</span>
                </a>
            </li>
            <li title="添加新下载资源">
                <a href="{% url 'admin:resources_resource_add' %}">
                    <i class="fa fa-download"></i>
                    <span>添加下载资源</span></a>
            </li>
            <li title="添加收藏网站">
                <a href="{% url 'admin:resources_favsite_add' %}">
                    <i class="fa fa-laptop-code"></i>
                    <span>添加收藏网站</span></a>
            </li>
            <li title="添加新工具">
                <a href="{% url 'admin:resources_tool_add' %}">
                    <i class="fa fa-tools"></i>
                    <span>添加新工具</span></a>
            </li>
            <li title="添加新定时任务">
                <a href="{% url 'admin:schedulers_scheduledtask_add' %}">
                    <i class="fa fa-clock"></i>
                    <span>添加新定时任务</span></a>
            </li>
            <li title="添加新轮播图">
                <a href="{% url 'admin:blog_carousel_add' %}">
                    <i class="fa fa-image"></i>
                    <span>添加新轮播图</span></a>
            </li>
            <li title="添加新友情链接">
                <a href="{% url 'admin:blog_friendlink_add' %}">
                    <i class="fa fa-link"></i>
                    <span>添加新友情链接</span>
                </a>
            </li>
            <li title="添加新菜单">
                <a href="{% url 'admin:blog_menu_add' %}">
                    <i class="fa fa-bars"></i>
                    <span>添加新菜单</span></a>
            </li>
        </ul>
    </div>

    <div class="section section-secondary">
        <h2>🕒 最近动作</h2>
        <ul>
            {% for entry in recent_actions %}
            <li>

                <time><strong>{{ entry.user.nickname }}</strong>{{ entry.action_time }}</time>
                <div>
                    {{ entry.content_type }}-
                    <em>{{ entry }}</em>
                </div>
            </li>
            {% endfor %}
        </ul>
    </div>
</div>
</body>
</html>
